﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using Quote.Model;
using System.Data.Entity.Infrastructure;

namespace Quote.DataContent
{
    public class QuoteDataContext : DbContext
    {
        public DbSet<Part> Parts { get; set; }
        public DbSet<PartInInventory> PartsInInventory { get; set; }
        //public DbSet<Customer> Customers { get; set; }
        //public DbSet<CustomerReqired> CustomerRequirds { get; set; }
        public DbSet<Product> Products { get; set; }


        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            Database.SetInitializer<QuoteDataContext>(new DropCreateDatabaseIfModelChanges<QuoteDataContext>());
        }    
    }
}
